﻿<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../../common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>排课系统</title>
<link href="${css_ctx}/style_login.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${js_ctx}/jquery-1.6.js"></script>
<script type="text/javascript" src="${js_ctx}/jquery.validate.js"></script>
<script type="text/javascript" src="${ctx }/fckeditor/fckeditor.js"></script>
	<script type="text/javascript">
		window.onload = function()
		{
			var oFCKeditor = new FCKeditor( 'remarks' ) ;
			oFCKeditor.BasePath = "${ctx }/fckeditor/" ;
			oFCKeditor.Width = "100%";
			oFCKeditor.Height = "300";
			oFCKeditor.ReplaceTextarea() ;
		}
	</script>
<script type="text/javascript">
            $(function(){
            
                $("#username").validate({
                    valid: function(val){
                        return val != "";
                    },
                    errorMessage: function(val){
                        return "不能为空！";
                    },
                    appendCompletionIcon: true
                });
                
               $("#password").validate({
                    valid: function(val){
                        return val != "";
                    },
                    errorMessage: function(val){
                        return "不能为空！";
                    },
                    appendCompletionIcon: true
                });
              
               $("#groupid").validate({
                    valid: function(val){
                        return val != "";
                    },
                    errorMessage: function(val){
                        return "你还没有选择教研室！";
                    },
                    appendCompletionIcon: true
                });
                
                $("#objectid").validate({
                    valid: function(val){
                        return val != "";
                    },
                    errorMessage: function(val){
                        return "你还没有选择学科！";
                    },
                    appendCompletionIcon: true
                });
                $("#realname").validate({
                    valid: function(val){
                        return val != "";
                    },
                    errorMessage: function(val){
                        return "不能为空！";
                    },
                    appendCompletionIcon: true
                });
            });
        </script>
</head>

<body style="background-color:#F2F2F2;">
<!-- Header -->
<div id="header_login">
  <div class="logo"><img src="${img_ctx}/logo.png" width="352" height="63" alt="西南航空专修学院排课系统" /></div>
    <ul class="menu">
	  <li><a href="${ctx}/">登录</a></li>
	  <li class="current"><a href="#">用户注册</a></li>
	</ul>
  <div class="clear"></div>
</div>
<!-- End of Header -->
<!-- main -->
<div id="main_login">
  <div class="content">
    <h3>新用户注册</h3>
    
    <!-- 提示信息 -->	
	  <c:if test="${!empty msg}">
	    <div class="box ${msgrank}">${msg}</div>
	    <c:remove var="msg" scope="session"/>
	  </c:if>
	<!-- 提示信息  end-->	
    
    <form id="form1" method="post" action="${ctx}/account.do?cmd=registersubmit">
    <input type="hidden" id="userid" value="${user.userid}" name="userid"/>
    <p>
    <label for="username"><font>*</font>用户名：</label><br/>
    <input type="text" id="username" class="full" value="" name="username"/>
    </p>
    <p>
    <label for="password"><font>*</font>密码：</label><br/>
    <input type="password" id="password" class="full" value="" name="password"/>
    </p>
    
    <p>
    <label for="userrole">用户角色：</label>
	<input type="radio" id="userrole1" class="" value="1" name="userrole" />
	<label class="choice" for="userrole1">管理员</label>&nbsp;&nbsp;
	<input type="radio" id="userrole2" class="" value="2" name="userrole"/>
	<label class="choice" for="userrole2">教研室主任</label>&nbsp;&nbsp;
	<input type="radio" id="userrole3" class="" value="3" name="userrole" checked="checked"/>
	<label class="choice" for="userrole3">普通教师</label>
    </p>
    
    <p>
    <label for="groupid"><font>*</font>所在教研组：</label><br/>
    <select name="groupid" id="groupid">
      <option value="">请选择教研组</option>
       <c:forEach items="${listClassgroup}" var="Classgroup">
       <option value="${Classgroup.groupid }" <c:if test="${Classgroup.groupid eq user.groupid}">selected="selected"</c:if>>${Classgroup.groupname }</option>
     </c:forEach>
     </select> 
    </p>
    
    <p>
    <label for="objectid"><font>*</font>学科：</label><br/>
    <select name="objectid" id="objectid">
      <option value="">请选择学科</option>
     <c:forEach items="${listCourse}" var="course">
       <option value="${course.objectid }">${course.objectname }</option>
     </c:forEach>
     </select> 
    </p>
    
     <p>
    <label for="realname"><font>*</font>真实名字：</label><br/>
    <input type="text" id="realname" class="full" value="" name="realname"/>
    </p>
    
     <p>
    <label for="usersex">性别：</label>
	<input type="radio" id="usersex1" class="" value="1" name="usersex" checked="checked"/>
	<label class="choice" for="usersex1">男</label>&nbsp;&nbsp;
	<input type="radio" id="usersex2" class="" value="2" name="usersex"/>
	<label class="choice" for="usersex2">女</label>
    </p>
     
    <p>
    <label for="isonline">离职情况：</label>
	<input type="radio" id="isonline1" class="" value="1" name="isonline" checked="checked"/>
	<label class="choice" for="isonline1">未离职</label>&nbsp;&nbsp;
	<input type="radio" id="isonline2" class="" value="2" name="isonline"/>
	<label class="choice" for="isonline2">离职</label>
    </p>
    
    <p>
    <label for="userphone">电话号码：</label><br/>
    <input type="text" id="userphone" class="full" value="" name="userphone"/>
    </p>
    <p>
    <label for="remarks">备注信息：</label><br/>
	<textarea id="remarks" name="remarks" ></textarea>
	</p>
	<br />
    <input type="submit" class="btn btn-green big1" value="注册"/> &nbsp; 
    <input type="reset" class="btn btn-green big1" value="取消" />
    </form>
  </div>
</div>
<!-- End of main -->
<!-- footer -->
<div id="footer">
    <%@ include file="../base/footer.jsp"%>
</div>
<!-- End of footer -->
</body>
</html>
